public class Weapon {
    String name;
    int ATK;
    public void showInfo(){
        System.out.println("我是武器,我的基本信息如下:");
        System.out.println("名字:"+name+",攻击力:"+ATK);
    }

    public static void main(String[] args) {
        Hero hero=new Hero();
        hero.name="奥特曼";
        hero.HP=800;
        hero.show();
        Weapon weapon=new Weapon();
        weapon.name="杀鸡刀";
        weapon.ATK=100;
        weapon.showInfo();
        Monster monster=new Monster();
        monster.name="龟丞相";
        monster.HP=300;
        monster.type="防御型";
        monster.showInfo();
    }
}
